package com.ssm.modules.dao;

import com.ssm.modules.entity.Course;
import com.ssm.modules.entity.Problem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @email: dong980514280@gmail.com
 * @author: HGL
 * @date: 2018/12/26
 * @time: 11:00
 */

public interface IProblemDao {

    List<Problem> findByStuId(@Param("stuId") int stuId,
                              @Param("page") int page,
                              @Param("pageSize") int pageSize);

    int findByStuIdCount(int stuId);

    List<Problem> findByTeaId(@Param("teaId") int teaId,
                              @Param("page") int page,
                              @Param("pageSize") int pageSize);

    int findByTeaIdCount(int teaId);

    List<Problem> selectAll();

    int addProblem(Problem problem);

    int updateProblem(Problem problem);

    int deleteProblem(int id);

    int updateReplay(@Param("id") int id,
                     @Param("reply") String reply);

}
